﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Timeline.Beans {
    public class AccountApi {
        [JsonProperty(PropertyName = "status")]
        public int Status { set; get; }

        [JsonProperty(PropertyName = "msg")]
        public string Msg { set; get; }

        [JsonProperty(PropertyName = "data")]
        public AccountApiData Data { set; get; }
    }

    public class AccountBindApi {
        [JsonProperty(PropertyName = "status")]
        public int Status { set; get; }

        [JsonProperty(PropertyName = "msg")]
        public string Msg { set; get; }

        [JsonProperty(PropertyName = "data")]
        public bool Data { set; get; }
    }

    public class AccountApiData {
        // 用户名
        [JsonProperty(PropertyName = "user")]
        public string User { get; set; }

        // 帐号是否注册
        [JsonProperty(PropertyName = "reg")]
        public bool Reg { get; set; }

        // 帐号是否激活（已注册）
        [JsonProperty(PropertyName = "active")]
        public bool Active { get; set; }

        // 密码验证是否通过（已注册）
        [JsonProperty(PropertyName = "auth")]
        public bool Auth { get; set; }

        // 是否为管理员帐号（已注册已激活已登录）
        [JsonProperty(PropertyName = "admin")]
        public bool Admin { get; set; }

        // 是否为R22帐号（已注册已激活已登录）
        [JsonProperty(PropertyName = "r22")]
        public bool R22 { get; set; }

        // 是否为R18帐号（已注册已激活已登录）
        [JsonProperty(PropertyName = "r18")]
        public bool R18 { get; set; }

        // 剩余图片下载次数（已注册已激活已登录）
        [JsonProperty(PropertyName = "download")]
        public int Download { get; set; }

        // 对话内容
        [JsonProperty(PropertyName = "chat")]
        public List<AccountApiDataChat> Chat { get; set; }
    }

    public class AccountApiDataChat {
        // 权限
        [JsonProperty(PropertyName = "door")]
        public string Door { get; set; }

        // 用户留言
        [JsonProperty(PropertyName = "comment")]
        public string Comment { get; set; }
        
        // 管理员回复
        [JsonProperty(PropertyName = "reply")]
        public string Reply { get; set; }
    }

    public class AccountApiReq {
        // 获取对话内容
        [JsonProperty(PropertyName = "chat")]
        public bool Chat { get; set; }

        // 获取原图一键下载次数
        [JsonProperty(PropertyName = "download")]
        public bool Download { get; set; }
    }
}
